#pragma once
#include "SquareNode.h"
#include "Space.h"
/*
  Copyright 2008 by Alexey Solovyev and University of Pittsburgh
  Licensed under the Academic Free License version 3.0
  See the file "LICENSE" for more information
*/

namespace org
{
	namespace spark
	{
		namespace space
		{

			//using org::spark::math;
			using org::spark::space::Space;

			/// <summary>
			/// The simplest space node
			/// </summary>
			class CircleNode : public SpaceNode
			{
				/// <summary>
				/// Default serialVersionUID
				/// </summary>
			private:
				//static const long long serialVersionUID = 1LL;

				
			protected:
				

				

				/// <summary>
				/// Changes the radius </summary>
				/// <param name="r"> </param>
			public:
				/// <summary>
				/// Creates the circle node of the given radius </summary>
				/// <param name="space"> </param>
				/// <param name="radius"> </param>
				CircleNode(Space *space, double radius);
				virtual void setRadius(double r);
				// The radius of the circle
				double radius;

				/// <summary>
				/// For internal use only. Preserves maximumNodeRadius. </summary>
				/// <param name="r"> </param>
				virtual void setRadius0(double r);


				virtual bool intersects(SpaceNode *node);


				virtual double getRelativeSize();


				virtual int getShape();

				virtual bool intersectsWith(CircleNode *circle);

				//virtual bool intersectsWith(Square2Node *node);


				virtual bool intersectsWith(SquareNode *node);

			protected:
			

			};

		}
	}
}
